|
Issues for Internet Explorer on the MacOS
|
Like any browser, Microsoft Internet Explorer for the Mac OS brings its own set of issues and limitations that need to be considered when creating sonified content. Some of these issues relate to the browser itself, while other relate to the specific mechanism that is used to achieve scriptable control over the Beatnik Player.
Because of the specific mechanism that is used to achieve scriptable control over the Beatnik Player in Internet Explorer for Mac OS, all of the instance methods are asynchronous in this browser. With other browser / platform combinations, all methods are synchronous, although some methods may appear to behave asynchronously because they place events in the MIDI event queue that only take effect at the audio engine level some time later (see the section Important Concepts: MIDI Event Queue).
To illustrate the difference between synchronous and asynchronous behavior, consider the following sample code example...
<HTML>
<HEAD><TITLE>Synchronous / Asynchronous</TITLE></HEAD>
<BODY>
<SCRIPT SRC="music-object.js"></SCRIPT>
<SCRIPT LANGUAGE=JavaScript><!-- //
music = new Music ();
music.onLoad ('music.play (); alert (music.isPlaying ())');
music.preloadEmbed ('stub.rmf');
// --></SCRIPT>
</BODY>
</HTML>
|
Now, if this example is loaded into a Beatnik-supported browser other than Internet Explorer for Mac OS, the alert dialog box that pops up should always display the value true. This is because the play method behaves synchronously in these browsers and completes its action (initiating playback) before the JavaScript interpreter can continue on to executing the statement that calls the isPlaying method.
By contrast, in Internet Explorer for Mac OS the play method behaves asynchronously and does not necessarily complete its action before the JavaScript interpreter continues on to execute the call to the isPlaying method. As a result, even though the play method is being called before the isPlaying method is being called, the player is likely not to have started playing by the time the isPlaying method is called, and so this method will almost always return the value false in this example.
In this kind of situation, a more reliable way of knowing when the player has actually started playing is to register a handler for the onPlay callback.
The amount of time lag (latency) between initiating an event using the Music Object API and hearing that event take effect in the Beatnik Player is influenced by several factors. For one thing, the speed of the JavaScript interpreter will affect how fast your sonification code can be processed. And then, the specific interconnection mechanism (that allows instructions to be carried from the JavaScript level in the browser to the native code level of a browser component) introduces a little more delay. Finally, the Beatnik Player's underlying audio engine introduces further latency as a result of building up audio buffers for synthesizing music.
Now, because of the specific mechanism that is used to achieve scriptable control over the Beatnik Player in Internet Explorer for Mac OS, a significant (yet not extreme) amount of additional latency is introduced. For most applications, this latency is still within acceptable limits. However, if you are creating interactive audio applications that are very time-critical, then you should be aware that this content may not perform as well in Internet Explorer on the Mac OS than it may perform in other browser / platform combinations.
Because of the specific mechanism that is used to achieve scriptable control over the Beatnik Player in Internet Explorer for Mac OS, there is a significant (yet not extreme) amount of added CPU overhead. In most applications, this additional CPU overhead is not even noticeable. However, the more Beatnik Player instances that are created, the greater the impact on the CPU from the interconnection mechanism. If your content is using a large number of instances (eg. more than 16), then you may notice a substantial and highly undesirable impact on the performance of the system.
To avoid serious performance problems, try to always test your sonified content in Mac IE and "tune" your content as needed.
Image swapping has been found to be somewhat slower in Internet Explorer on the Mac OS than with other browser / platform combinations. If your sonified content is making use of image swapping and you are finding it to be sluggish in Mac IE, then one alternative to consider would be to use layers for storing the different states for buttons.
The ONFOCUS event for form SELECT elements is implemented quite differently in Microsoft Internet Explorer on the Mac OS than it is in other browsers. As a result, the sonification of SELECT elements in forms using the Wizards extension may not behave quite as expected in this browser.